package com.scu.phototab.util;

import com.scu.phototab.bean.RetUser;
import com.scu.phototab.bean.User;

import static com.scu.phototab.util.Predictions.checkNotNull;

/**
 * Created by tianfei on 2017/4/14.
 */
public final class UserUtil {


    public static RetUser change2RetUser(User user){

        checkNotNull(user);

        RetUser ret=new RetUser();

        ret.setId(user.getId());
        ret.setName(user.getName());
        ret.setSignature(user.getSignature());
        ret.setEmail(user.getEmail());
        ret.setHeaderUrl(user.getHeaderUrl());

        return ret;
    }


}
